<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编程语言测试</title>
    <link rel="stylesheet" href="../../css/navbar.css">
    <link rel="stylesheet" href="../../css/layui.css">
    <link rel="stylesheet" href="../../css/sub-practice/language_test.css">
</head>
<body>
    <!-- 导航栏 -->
    <div class="navbar">
        <div class="left">
            <a href="/">首页</a>
            <a href="/all_questions.html">编程题库</a>
        </div>
        <div class="center">
            <a href="/html/job_seek.html">求职</a>
            <a href="/html/learning.html">学习</a>
            <a href="/html/discuss.html">讨论</a>
            <a href="/html/question_bank.html">知识题库</a>
            <a href="/html/ai_qa.html">AI问答</a>
        </div>
        <div class="right">
            <a href="/html/register.html">注册</a>
            <a href="/html/login.html">登录</a>
            <a href="/html/userInfo.html" class="toRight">个人信息</a>
        </div>
    </div>

    <!-- 主内容 -->
    <main>
        <div class="test-container">
            <h1>编程语言测试</h1>
            <p>选择您擅长的编程语言，开始挑战，测试您的掌握程度！</p>
            
            <div class="language-options">
                <div class="language-card">
                    <h2>Python</h2>
                    <p>测试 Python 基础和高级技能。</p>
                    <button onclick="startTest('Python')">开始测试</button>
                </div>
                <div class="language-card">
                    <h2>Java</h2>
                    <p>检验您对 Java 的理解。</p>
                    <button onclick="startTest('Java')">开始测试</button>
                </div>
                <div class="language-card">
                    <h2>C++</h2>
                    <p>挑战 C++ 知识点，提升技能。</p>
                    <button onclick="startTest('C++')">开始测试</button>
                </div>
                <div class="language-card">
                    <h2>JavaScript</h2>
                    <p>测试 JavaScript 前端及逻辑能力。</p>
                    <button onclick="startTest('JavaScript')">开始测试</button>
                </div>
            </div>
        </div>
    </main>

    <script>
        // 按钮点击事件，跳转到测试页面
        function startTest(language) {
            const url = `/html/sub-practice/${language.toLowerCase()}_test.html`;
            window.location.href = url;
        }
    </script>
</body>
</html>